<template>
    <div>
        <!-- provide 类型的定义 -->
        <p>
            我是父组件
        </p>
        <!-- 使用子组件 -->
        <providechild></providechild>
    </div>
</template>

<script lang='ts' setup>
import { ref, type Ref, provide } from 'vue';
// 引入子组件
import providechild from '@/components/providechild.vue';

// 按需导入key
import { key } from '@/types/type'

interface itemType {
    id: number,
    name: string
}
const namrArr: Ref<itemType[]> = ref([{ id: 1, name: "德玛西亚" }]);

provide(key, namrArr)


</script>
<style scoped>

</style>